import { createRouter, createWebHashHistory } from "vue-router";
import { reactive } from "vue";


const Layout = () => import("@src/view/components/layout/index.vue")

const routes = reactive([
  {
    path: "/",
    component: Layout,
    redirect: "/home",
    meta: { title: "首页", icon: "sfont system-home" },
    children: [
      {
        path: "home",
        component: () => import("../pages/home/index.vue"),
        meta: { title: "首页", icon: "sfont system-home", hideClose: true },
      },
    ],
  },
  {
    path: "/setting",
    component: Layout,
    redirect: "/setting/conf",
    meta: { title: "设置", icon: "sfont system-home" },
    children: [
      {
        path: "/setting/conf",
        component: () => import("../pages/setting/index.vue"),
        meta: { title: "设置", icon: "sfont system-home", hideClose: true },
      },
    ],
  },
]);

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
